package com.qf.leadnewsuser.web.v1;

import com.qf.leadnewsuser.service.UserService;
import com.qf.qfleadnewsmodel.commons.dtos.ResponseResult;
import com.qf.qfleadnewsmodel.user.dtos.LoginDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1")
public class UserController {

    @Autowired
    private UserService userService;

    @PostMapping("/login/login_auth")
    public ResponseResult login(@RequestBody LoginDto loginDto){

        return userService.login(loginDto);
    }
}
